开始之前
组件格式
<script>
<script content="module">
<style>
模版语法
Tags
Attributes
Text expression
HTML expression
If blocks
Each blocks
Await blocks
DOM events
Component events
Element bindings
Binding related elements
Binding value
Media element bindings
Binding a DOM node
Component bindings
Classes
Actions
Transitions
Transition参数
自定义过渡函数
Transition事件
Animations
Animation参数
自定义Animation函数
svelte:self
svelte:component
svelte:window
svelte:body
svelte:head
svelte:options
@debug
编译时
svelte.compile
svelte.parse
svelte.preprocess
svelte.walk
svelte.VERSION
Published with GitBook
Text expression
Text expressions
{expression}
文本还可以包含 javascript 表达式:
<
h1
>
Hello {name}!
</
h1
>
<
p
>
{a} + {b} = {a + b}.
</
p
>
results matching "
"
No results matching "
"